<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        /*display:inline：改成行内元素*/
        /*display:block：改成块元素*/
        /*display: inline-block：块元素且行内元素*/
        div{
            width: 100px;
            height: 100px;
            border: 1px solid red;
            display:inline;;
        }
        span{
            width: 100px;
            height: 100px;
            border: 1px solid red;
            display: inline-block;
        }
    </style>

</head>
<body>

<div>div块元素</div>
<span>span行内元素</span>

</body>
</html>